<include file="Public/header"/>
<div class="x-nav">
      <span class="layui-breadcrumb">
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <div class="layui-tab">
            <ul class="layui-tab-title">
            	
                <li class="layui-this">基本设置</li>
                <!-- <li>分销设置</li> -->
                <!--<li>短信设置</li>-->
                <li>上传设置</li>
                <li>模板消息</li>
                <!--<li>主题设置</li>-->
                <!--<li>界面设置</li>-->
                <li>客服电话</li>
                <li>团长参数</li>
                <!-- <li>评论设置</li> -->
                <li>提现设置</li>
                <li>小程序开关</li>
                <li>订单设置</li>
                <li>红包设置</li>
                <li>优惠券设置</li>
                <li>打印机设置</li>
                <li>广告设置</li>
                <li>流量主广告设置</li>
                <li>分享设置</li>
            </ul>
            <div class="layui-tab-content">


                <div class="layui-tab-item layui-show">
                    <form class="layui-form" action="{:U('update')}" >

                        <div class="layui-form-item" style="margin-top:30px;">
                            <label for="appid"  class="layui-form-label" style="width:120px;">
                            	appid
                            </label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text"  name="appid"  value="{$data['appid']}" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>
                        </div>
                        <div class="layui-form-item">
                            <label for="appkey" class="layui-form-label" style="width:120px;">
                            	appsecretekey
                            </label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text" name="appkey" value="{$data['appkey']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>                            
                        </div>
                        <div class="layui-form-item">
                            <label for="mchid" class="layui-form-label" style="width:120px;">
                            	商户号
                            </label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text" name="mchid"  value="{$data['mchid']}" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>                            
                        </div>
                        <div class="layui-form-item">
                            <label for="wxpaykey" class="layui-form-label" style="width:120px;">支付密钥</label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text" name="wxpaykey"  value="{$data['wxpaykey']}" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>                            
                        </div>

                        <div class="layui-form-item">
                            <label for="apiclient_cert" class="layui-form-label" style="width:120px;">微信支付apiclient_cert <php>
                                if($data['apiclient_cert']) echo '(已填写)'
                            </php></label>
                            <div class="layui-input-inline" style="width:70%">
                                <textarea name="apiclient_cert"   placeholder="" class="layui-textarea onfocus" t="{$data['apiclient_cert']}"></textarea>

                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="apiclient_key"  class="layui-form-label" style="width:120px;">微信支付apiclient_key <php>
                                if($data['apiclient_key']) echo '(已填写)'
                            </php></label>
                            <div class="layui-input-inline" style="width:70%">
                                <textarea name="apiclient_key" placeholder=""  class="layui-textarea onfocus" t="{$data['apiclient_key']}"></textarea>
                            </div>
                        </div>
                        
                          
                        <div class="layui-form-item">
                            <label class="layui-form-label" for="sitename" style="width:120px;">网站名称</label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text" name="sitename"  value="{$data['sitename']}" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                             <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>                           
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" for="copyright" style="width:120px;">版权信息</label>
                            <div class="layui-input-inline" style="width:70%">
                                <input type="text" name="copyright"  value="{$data['copyright']}" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                             <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>
							</div>                           
                        </div>                        
<!--
                        <div class="layui-form-item">
                            <label for="sort" class="layui-form-label">
                                <span class="x-red"></span>应用图标
                            </label>
                            <div class="layui-input-inline">
                                <div class="layui-upload-list">
                                    <input type="hidden" name="logo"  value="{$data['logo']}" >
                                    <img class="layui-upload-img" style="width: 100px;" id="avatar-preview" src="{$data['logo']}">
                                    <p id="demoText"></p>
                                </div>
                                <button type="button" class="layui-btn" id="avatar-btn">
                                    <i class="layui-icon">&#xe67c;</i>上传图片
                                </button>
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                <span class="x-red"></span>
                            </div>
                        </div>
                        -->



                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">提交</button>
                        </div>

                    </form>

                </div>
                <!-- 
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}">

                    <div class="layui-form-item">
                        <label class="layui-form-label">分销返现设置[%/元](全局)</label>
                        <div class="layui-input-block">
                            <input type="number" name="share_commission" value="{$data['share_commission']|default=0}"  placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">分销成团设置(全局)</label>
                            <div class="layui-input-block">
                                <input type="number" name="tuan"  value="{$data['tuan']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                        </div>



                        <div class="layui-form-item">
                            <label class="layui-form-label">佣金发放形式</label>
                            <div class="layui-input-block">
                                <select name="pay_type" lay-verify="required">
                                    <option value="1" <php>if($data['pay_type'] == 1) echo 'selected'</php>>企业付款到零钱</option>
                                    <option value="2" <php>if($data['pay_type'] == 2) echo 'selected'</php>>微信现金红包</option>

                                </select>
                            </div>
                        </div>

                          
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">提交</button>
                        </div>
                        
                    </form>

                </div>
                -->
                <!--<div class="layui-tab-item">-->
                    <!--<form class="layui-form" action="">-->

                        <!--<div class="layui-form-item">-->
                            <!--<label class="layui-form-label">阿里云短信KeyId</label>-->
                            <!--<div class="layui-input-block">-->
                                <!--<input type="text" name="title" required  lay-verify="required"  placeholder="请输入标题" autocomplete="off" class="layui-input">-->
                            <!--</div>-->
                        <!--</div>-->
                        <!--<div class="layui-form-item">-->
                            <!--<label class="layui-form-label">阿里云短信KeySecret</label>-->
                            <!--<div class="layui-input-block">-->
                                <!--<input type="text" name="title" required  lay-verify="required"  placeholder="请输入标题" autocomplete="off" class="layui-input">-->
                            <!--</div>-->
                        <!--</div>-->
                        <!--<div class="layui-form-item">-->
                            <!--<label class="layui-form-label">手机验证模板CODE</label>-->
                            <!--<div class="layui-input-block">-->
                                <!--<input type="text" name="title" required  lay-verify="required"  placeholder="请输入标题" autocomplete="off" class="layui-input">-->
                                <!--<span>alii</span>-->
                            <!--</div>-->
                        <!--</div>-->
                        <!--<div class="layui-form-item">-->
                            <!--<label for="L_repass" class="layui-form-label">-->
                            <!--</label>-->
                            <!--<button  class="layui-btn" lay-filter="add" lay-submit="">-->
                                <!--提交-->
                            <!--</button>-->
                        <!--</div>-->
                    <!--</form>-->

                <!--</div>-->
                  <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}">

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:130px;">上传方式</label>
                            <div class="layui-input-block" style='margin-left:160px;width:75%;'>
                                <select name="upload_type" lay-verify="required" lay-filter="upload_type" >
                                    <option value="0" <php>if($data['upload_type'] == 0) echo 'selected'</php>>本地上传</option>
                                    <option value="1" <php>if($data['upload_type'] == 1) echo 'selected'</php>>阿里云</option>
									<option value="2" <php>if($data['upload_type'] == 2) echo 'selected'</php>>七牛云</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item" >
                            <label class="layui-form-label" style="width:130px;">上传文件大小限制(kb)</label>
                            <div class="layui-input-block">
                                <input type="text" name="max_upload_size"  value="{$data['max_upload_size']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        
                        <div class="layui-form-item" id="oss1" <if condition="$data.upload_type eq 1"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">阿里云 oss_access_id</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss_access_id"  value="{$data['oss_access_id']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="oss2" <if condition="$data.upload_type eq 1"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">阿里云 oss_access_key</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss_access_key"  value="{$data['oss_access_key']}"   placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="oss3" <if condition="$data.upload_type eq 1"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">阿里云 oss_endpoint</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss_endpoint" value="{$data['oss_endpoint']}"   placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="oss4" <if condition="$data.upload_type eq 1"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">阿里云OSS bucket</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss_bucket"  value="{$data['oss_bucket']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="oss5" <if condition="$data.upload_type eq 1"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">阿里云oss_web_site</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss_web_site"  value="{$data['oss_web_site']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
 						 
                        </div>

                         <div class="layui-form-item" id="qn1" <if condition="$data.upload_type eq 2"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">七牛云 oss_accessKey</label>
                            <div class="layui-input-block">
                                <input type="text" name="qiniu_ak"  value="{$data['qiniu_ak']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="qn2" <if condition="$data.upload_type eq 2"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">七牛云oss_secretKey</label>
                            <div class="layui-input-block">
                                <input type="text" name="qiniu_sk"  value="{$data['qiniu_sk']}"   placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="qn3" <if condition="$data.upload_type eq 2"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">七牛云OSS bucket</label>
                            <div class="layui-input-block">
                                <input type="text" name="qiniu_bucket"  value="{$data['qiniu_bucket']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
                        </div>
                        <div class="layui-form-item" id="qn4" <if condition="$data.upload_type eq 2"> style="display:block"<else/>style="display:none" </if>>
                            <label class="layui-form-label" style="width:130px;">七牛云OSS_web_site</label>
                            <div class="layui-input-block">
                                <input type="text" name="qiniu_site"  value="{$data['qiniu_site']}"  placeholder="" autocomplete="off" class="layui-input" style="width:80%;">
                            </div>
 						 
                        </div>
                   
                        <!-- 
						<div class="layui-form-item">
                            <label class="layui-form-label">允许上传图片大小(kb)</label>
                            <div class="layui-input-block">
                                <input type="number" name="max_upload_size"  value="{$data['max_upload_size']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
 						-->
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>

                </div>
               
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                        <div class="layui-form-item" style="margin-top:30px;">
                            <label  class="layui-form-label" for="code1"  style="width:120px;">订单支付成功通知</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="code1"  value="{$data['code1']}" placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单号、金额、物品名称、下单时间
							</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" for="code2"  style="width:120px;">取货通知提醒</label>
                            <div class="layui-input-inline" style="width:63%;">
                                <input type="text" name="code2"  value="{$data['code2']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>订单号、商品详情、团长姓名、联系电话、取货地点
							</div>                            
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">申请团长提醒通知</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input type="text" name="code3"  value="{$data['code3']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                             <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>用户名、时间、申请小区、申请人
							</div>                            
                        </div>
                        
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>


                <!--<div class="layui-tab-item">-->
                    <!--<form class="layui-form" action="{:U('update')}">-->

                        <!--<div class="layui-form-item">-->
                            <!--<label class="layui-form-label">顶部导航栏效果</label>-->
                            <!--<div class="layui-input-inline">-->
                                <!--<input type="color" name="shop_color" value="{$data.shop_color}"-->
                                       <!--style="padding-left:0px;" autocomplete="off" class="layui-input">-->
                            <!--</div>-->
                        <!--</div>-->

                        <!--<div class="layui-form-item">-->
                            <!--<label for="L_repass" class="layui-form-label">-->
                            <!--</label>-->
                            <!--<button  class="layui-btn" lay-filter="submit" lay-submit="submit">-->
                                <!--提交-->
                            <!--</button>-->
                        <!--</div>-->
                    <!--</form>-->
                <!--</div>-->
				<!-- 
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}">

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:130px;">首页商品布局</label>
                            <div class="layui-input-block" style="width:50%;">
                                矩阵形式<input name="sort_type" type="radio" value="1"  <php>if($data['sort_type'] == 1) echo 'checked'</php>/>
                                列表形式<input name="sort_type" type="radio" value="2" <php>if($data['sort_type'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>
                -->
                <!-- 客服 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                        <div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">客服电话</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input name="kefumobile" type="text" value="{$data['kefumobile']}"  placeholder="" autocomplete="off" class="layui-input"  />
                            </div>
                             <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>
							</div>                             
                        </div>
<!--  
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">客服时间</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input name="kefu_time" type="text" value="{$data['kefu_time']}"  placeholder="" autocomplete="off" class="layui-input"  />
                            </div>
                             <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>
							</div>                             
                        </div>
-->
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>                

                <!-- 团长参数 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >
						<!-- 
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">团长发起团购</label>
                            <div class="layui-input-block" >
                            免费<input name="is_tuan_free" type="radio" value="1"  <php>if($data['is_tuan_free'] == 1) echo 'checked'</php>/>
		   收费<input name="is_tuan_free" type="radio" value="2" <php>if($data['is_tuan_free'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">团长查看销售排行</label>
                            <div class="layui-input-block">
                         不可以查看<input name="is_tuan_rank" type="radio" value="1"  <php>if($data['is_tuan_rank'] == 1) echo 'checked'</php>/>
		   可以查看<input name="is_tuan_rank" type="radio" value="2" <php>if($data['is_tuan_rank'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>
                        -->
                        
                        
				        <div class="layui-form-item" style="margin-top:30px;">
				               <label for="zongtuanzhang_fee" class="layui-form-label" style="width:120px;">
				               		<span class="x-red"></span>总团长佣金比例
				               </label>
				               <div class="layui-input-inline" style="width:70%;">
				            		<input name="zongtuanzhang_fee" type="text" value="{$data['zongtuanzhang_fee']}" 
				            		required="" lay-verify="required" 
				            		placeholder="" autocomplete="off" class="layui-input">
				               </div>
				               <div class="layui-form-mid layui-word-aux">
									<span class="x-red"></span>单位:%
							   </div>
				        </div>                       
                        <div class="layui-form-item">
                            <label for="fee" class="layui-form-label" style="width:120px;">团长佣金比例</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="fee" type="text" value="{$data['fee']}"  placeholder="" autocomplete="off" class="layui-input"   />
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:%
							</div>
                        </div>
                        <div class="layui-form-item">
                            <label for="peisong_fee" class="layui-form-label" style="width:120px;">配送费</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="peisong_fee" type="text" value="{$data['peisong_fee']}"  placeholder="" autocomplete="off" class="layui-input"   />
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:元
							</div>
                        </div>
                        
  
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                        
                        
                    </form>
                </div>
                <!-- 评论参数 -->
                <!-- 
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                    	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">是否允许评论</label>
                            <div class="layui-input-block">
                                允许评论<input name="is_comment" type="radio" value="1"  <php>if($data['is_comment'] == 1) echo 'checked'</php>/>
                                不可以评论<input name="is_comment" type="radio" value="2" <php>if($data['is_comment'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>

                    	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">评论是否需要审核</label>
                            <div class="layui-input-block">
                                需要审核<input name="is_comment_examine" type="radio" value="1"  <php>if($data['is_comment_examine'] == 1) echo 'checked'</php>/>
                                无需审核<input name="is_comment_examine" type="radio" value="2" <php>if($data['is_comment_examine'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>

                    	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">评论显示状态</label>
                            <div class="layui-input-block">
                                显示<input name="is_comment_show" type="radio" value="1"  <php>if($data['is_comment_show'] == 1) echo 'checked'</php>/>
                                隐藏<input name="is_comment_show" type="radio" value="2" <php>if($data['is_comment_show'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>
                -->

				<!-- 提现参数设置 -->
                 <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                    	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">提现状态</label>
                            <div class="layui-input-block" >
                                <input name="is_withdraw" type="radio" value="1" title="可以提现"  <php>if($data['is_withdraw'] == 1) echo 'checked'</php>>
                                <input name="is_withdraw" type="radio" value="2" title="不可以提现" <php>if($data['is_withdraw'] == 2) echo 'checked'</php>>
                            </div>
                        </div>      

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">提现最小值</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="is_withdraw_limit_min" type="number" value="{$data['is_withdraw_limit_min']}"  placeholder="" autocomplete="off" class="layui-input"  />
                            </div>
							<div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:元
							</div>                            
                        </div>
                         <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">提现最大值</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="is_withdraw_limit_max" type="number" value="{$data['is_withdraw_limit_max']}"  placeholder="" autocomplete="off" class="layui-input"  />
                            </div>
							<div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:元
							</div>                            
                        </div>                       

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">每周提现次数</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="is_withdraw_frequency" type="number" value="{$data['is_withdraw_frequency']}"  placeholder="" autocomplete="off" class="layui-input" />
                            </div>
							<div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>
							</div>                            
                        </div>
                        
                        <div class="layui-form-item" style="display:none;">
                            <label class="layui-form-label" style="width:120px;">手续费最大值</label>
                            <div class="layui-input-inline">
                         		<input name="is_withdraw_max_poundage" type="number" value="{$data['is_withdraw_max_poundage']}"  placeholder="" autocomplete="off" class="layui-input" />
                            </div>
							<div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:元
							</div>                            
                        </div>                        

                        <div class="layui-form-item" style="display:none;">
                            <label class="layui-form-label" style="width:120px;">手续费最小值</label>
                            <div class="layui-input-line">
                         		<input name="is_withdraw_min_poundage" type="number" value="{$data['is_withdraw_min_poundage']}"  placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>                        
                        
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">提现手续费百分比</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="is_withdraw_percent" type="text" value="{$data['is_withdraw_percent']}"  placeholder="" autocomplete="off" class="layui-input" />
                            </div>
							<div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位:%
							</div>                            
                        </div>             

                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>
                <!-- 小程序站点开关 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                    	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">小程序开关</label>
                            <div class="layui-input-inline" >
                                <input name="is_web" type="radio" value="1"  title="打开" <php>if($data['is_web'] == 1) echo 'checked'</php> >
                                <input name="is_web" type="radio" value="2" title="关闭" <php>if($data['is_web'] == 2) echo 'checked'</php>>
           <!--  暂停<input name="is_web" type="radio" value="3" <php>if($data['is_web'] == 3) echo 'checked'</php>/>-->
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">暂停(关闭)说明</label>
                            <div class="layui-input-inline" style="width:70%;">
                         		<input name="is_web_explain" type="text" value="{$data['is_web_explain']}"  placeholder="" autocomplete="off" class="layui-input"  />
                            </div>
			               <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>
						   </div>                            
                        </div> 

                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>
                <!-- 订单参数 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                        <div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:170px;">未支付订单自动取消时间</label>
                            <div class="layui-input-inline" style="width:70%;" >
                                <input  type="text" name="pay_end_time"  value="{$data['pay_end_time']}" placeholder="" autocomplete="off" class="layui-input" >
                            </div>
				            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>时间单位:分钟
						    </div>                           
                        </div>
<!-- 
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:170px;">自动核销时间</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="hexiao_end_time"  value="{$data['hexiao_end_time']}"  placeholder="时间单位天数" autocomplete="off" class="layui-input" >
                            </div>
 				            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>时间单位:天数
						    </div>                           
                        </div>
 -->

                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>                    
                <!-- 红包设置 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                     	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">红包分配方式</label>
                            <div class="layui-input-block">
                              <input name="hb_type" type="radio" value="1" title="随机"  <php>if($data['hb_type'] == 1) echo 'checked'</php>/>
                                <input name="hb_type" type="radio" value="2" title="平均" <php>if($data['hb_type'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>                       
                        
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">拆红包人数</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="hb_num"  value="{$data['hb_num']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
 				            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>
						    </div>                             
                        </div>
                     	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">是否开启红包</label>
                            <div class="layui-input-block">
                              	<input name="hb_status" type="radio" value="1" title="关闭"  <php>if($data['hb_status'] == 1) echo 'checked'</php>/>
                                <input name="hb_status" type="radio" value="2" title="开启" <php>if($data['hb_status'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">折红包时间</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="hb_end_time"  value="{$data['hb_end_time']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
  				            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>单位：小时
						    </div>                           
                        </div>                        
                         <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">红包使用期限</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="hb_use_end_time"  value="{$data['hb_use_end_time']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
  				            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>天数
						    </div>                              
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">消费满足金额</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="number" name="hb_pay_jiner"  value="{$data['hb_pay_jiner']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                        </div>                       
                         <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">红包使用规则</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="hb_rule"  value="{$data['hb_rule']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">红包总金额</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="number" name="hb_jiner"  value="{$data['hb_jiner']}" placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                        </div>                                                                       
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>                 
                <!-- 优惠券设置 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                     	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">优惠券</label>
                            <div class="layui-input-inline">
                               <input name="is_use_quan" type="radio" value="1" title="不可用" <php>if($data['is_use_quan'] == 1) echo 'checked'</php>/>
                               <input name="is_use_quan" type="radio" value="2" title="可用"  <php>if($data['is_use_quan'] == 2) echo 'checked'</php>/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>                        
                    </form>
                </div>                                                
                <!-- 打印机设置 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >
                        <div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">应用Id</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="clientid"  value="{$data['clientid']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>必须是开发者创建应用的Id
						    </div> 
                        </div>
                         <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">应用密钥</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="clientsecret"  value="{$data['clientsecret']}"  placeholder="" autocomplete="off" class="layui-input" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>必须是开发者创建应用的密钥
						    </div>                            
                        </div>
 
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">打印机平台名称：</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="ptr_platform"  value="{$data['ptr_platform']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>例如：易邦云
						    </div>
                        </div> 

                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">品牌名称：</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="ptr_xcxname"  value="{$data['ptr_xcxname']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>例如：鲜果街Go
						    </div> 
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">打印机终端编号：</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="ptr_code"  value="{$data['ptr_code']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>例如：4004583651
						    </div> 
                        </div>                                            
                     	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">应用类型</label>
                            <div class="layui-input-block">
                               <input name="granttype" type="radio" value="client_credentials" title="自有型应用" <php>if($data['granttype'] == 'client_credentials') echo 'checked'</php>/>
                                <input name="granttype" type="radio" value="authorization_code" title="开放型应用"  <php>if($data['granttype'] == 'authorization_code') echo 'checked'</php>/>
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>目前只支持:自有型应用
						    </div>                            
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>                        
                    </form>
                </div>

                <!-- 广告 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}" >

                     	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">轮播</label>
                            <div class="layui-input-block">
                               <input name="is_open_flash" type="radio" value="1" title="开启"  <php>if($data['is_open_flash'] == '1') echo 'checked'</php>/>
                                <input name="is_open_flash" type="radio" value="2" title="关闭"  <php>if($data['is_open_flash'] == '2') echo 'checked'</php>/>
                            </div>
                        </div>
                     	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">广告</label>
                            <div class="layui-input-block">
                               <input name="is_open_adv" type="radio" value="1" title="开启" <php>if($data['is_open_adv'] == '1') echo 'checked'</php>/>
                                <input name="is_open_adv" type="radio" value="2" title="关闭"  <php>if($data['is_open_adv'] == '2') echo 'checked'</php>/>
                            </div>
                        </div>
                     	<div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">分类</label>
                            <div class="layui-input-block">
                               <input name="is_open_cates" type="radio" value="1" title="开启" <php>if($data['is_open_cates'] == '1') echo 'checked'</php>/>
                                <input name="is_open_cates" type="radio" value="2" title="关闭"  <php>if($data['is_open_cates'] == '2') echo 'checked'</php>/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>                
                <!-- 流量主广告设置 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}">

                     	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">状态</label>
                            <div class="layui-input-block">
                               <input name="liuliang_status" type="radio" value="1" title="开启"  <php>if($data['liuliang_status'] == '1') echo 'checked'</php>/>
                                <input name="liuliang_status" type="radio" value="2" title="关闭"  <php>if($data['liuliang_status'] == '2') echo 'checked'</php>/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label" style="width:120px;">首页广告Id：</label>
                            <div class="layui-input-inline" style="width:70%;">
                                <input  type="text" name="liuliang_ad_id"  value="{$data['liuliang_ad_id']}"  placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
								<span class="x-red"></span>例如：adunit-e3c8acb985fc3266
						    </div> 
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>
                 <!-- 分享设置 -->
                <div class="layui-tab-item">
                    <form class="layui-form" action="{:U('update')}">

                     	<div class="layui-form-item" style="margin-top:30px;">
                            <label class="layui-form-label" style="width:120px;">分享状态</label>
                            <div class="layui-input-block">
                               <input name="is_open_share" type="radio" value="1" title="开启"  <php>if($data['is_open_share'] == '1') echo 'checked'</php>/>
                                <input name="is_open_share" type="radio" value="2" title="关闭"  <php>if($data['is_open_share'] == '2') echo 'checked'</php>/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label for="L_repass" class="layui-form-label">
                            </label>
                            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                                提交
                            </button>
                        </div>
                    </form>
                </div>                                 
            </div>
        </div>
    </div>



</div>
<script>


    $('.onfocus').focus(function () {
        $(this).text($(this).attr('t'));
    })
  	/*线路改变获取小区操作*/
	layui.use(['layer', 'form'], function(){
		    var layer = layui.layer,form = layui.form;
		    form.on('select(upload_type)', function(data){
		   	if(data.value=="0"){
			    $("#oss1").hide();
			    $("#oss2").hide();
			    $("#oss3").hide();
			    $("#oss4").hide();
			    $("#oss5").hide();
			    $("#qn1").hide();
			    $("#qn2").hide();
			    $("#qn3").hide();
			    $("#qn4").hide();
		  	}
		   	if(data.value=="1"){
			    $("#oss1").show();
			    $("#oss2").show();
			    $("#oss3").show();
			    $("#oss4").show();
			    $("#oss5").show();
			    $("#qn1").hide();
			    $("#qn2").hide();
			    $("#qn3").hide();
			    $("#qn4").hide();
		  	}		  	
		   	if(data.value=="2"){
			    $("#oss1").hide();
			    $("#oss2").hide();
			    $("#oss3").hide();
			    $("#oss4").hide();
			    $("#oss5").hide();
			    $("#qn1").show();
			    $("#qn2").show();
			    $("#qn3").show();
			    $("#qn4").show();
		  	}		  
		});
	});

    layui.use(['form','layer','upload','laydate'], function() {
        $ = layui.jquery;
        var form = layui.form
            , layer = layui.layer;
        var upload = layui.upload;
        var laydate = layui.laydate;
        laydate.render({
            elem: '#start' //指定元素
        });


        var uploadInst = upload.render({
            elem: '#avatar-btn'
            , url: "{:U('Upload/uploadpic')}"
            , data: {
                name: 'img'

            }
            , field: 'img'
            , before: function (obj) {
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result) {
                    $('#avatar-preview').attr('src', result); //图片链接（base64）
                });
            }
            , done: function (res) {


                if (res.code != 0) {
                    layer.msg(res.msg, {icon: 5});

                }
                //上传成功
                if (res.code == 0) {
                    layer.msg('上传成功', {icon: 6});
                    $("[name='logo']").val(res.data);

                }

            }
            , error: function () {
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function () {
                    uploadInst.upload();
                });
            }
        });

    });


</script>

<include file="Public/footer"/>